<template>
  <div>
    <button></button>
    <h1 @click="rice.name+='!'">{{ rice.name }}</h1>
    <h1 @click="addFood">{{ rice }}</h1>
  </div>
</template>

<script setup lang="ts">
import { ref } from "vue";

const rice=ref({
  name:'米',
  price:500,
  foods:['盐','酱油','白糖']
})
const addFood=()=>{
  rice.value.foods.push('大骨头')
}
</script>

<style>

</style>